File information: | |
File name: | Streams.mesa_Oct77.pdf [preview Streams.mesa Oct77] |
Size: | 578 kB |
Extension: | |
Mfg: | xerox |
Model: | Streams.mesa Oct77 🔎 |
Original: | Streams.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing Streams.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 11-03-2020 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name Streams.mesa_Oct77.pdf streams.mesa 24-0CT-77 18:44:36 Page 1 -- Streams.Mesa Edited by Sandman on August 23, 1977 10:19 PM DIRECTORY AltoDefs: FROM "altodefs", AltoFileDefs: FROM "altofiledefs", BFSDefs: FROM "bfsdefs". DiskDefs: FROM "diskdefs". InlineDefs: FROM "inlinedefs", MiscDefs: FROM "miscdefs". SegmentDefs: FROM "segmentdefs", StreamDefs: FROM "streamdefs". SystemDefs: FROM "systemdefs"; DEFINITIONS FROM AltoDefs. AltoFileDefs, StreamDefs; Streams: PROGRAM IMPORTS BFSDefs, MiscD~fs, SegmentDefs, SystemDefs EXPORTS StreamDefs SHARES StreamDefs, SegmentDefs = BEGIN WindowSize: PageCount = 1; StreamError: PUBLIC SIGNAL [stream:StreamHandle, error:StreamErrorCode] CODE; NewByteStream: PUBLIC PROCEDURE [name: STRING, access:AccessOptions] RETURNS [DiskHandle] = BEGIN OPEN SegmentDefs; RETURN[Create[NewFile[name, access, DefaultVersion],bytes,access]] END; NewWordStream: PUBLIC PROCEDURE [name: STRING, access:AccessOptions] RETURNS [DiskHandle] = BEGIN OPEN SegmentDefs; RETURN[Create[NewFile[name, access, DefaultVersion],words,access]] END: CreateByteStream: PUBLIC PROCEDURE [file:SegmentDefs.FileHandle, access: AccessOptions] RETURNS [DiskHandle] = BEGIN RETURN[Create[file,bytes,access]] END; CreateWordStream: PUBLIC PROCEDURE [file:SegmentDefs.FileHandle, access: AccessOptions] RETURNS [DiskHandle] = BEGIN RETURN[Create[file,words,access]] END; Model: Disk StreamObject = StreamObject [ Reset, ReadByte, PutBack, WriteByte, EndOf, Destroy, Disk [ FALSE. FALSE, 1, 0, NIL, 0, 0, Fixup, ReadError, Fixup, WriteByte, NIL, FALSE, FALSE, FALSE, 0, 0, , ]]; Create: PROCEDURE [file:SegmentDefs.FileHandle, units:{bytes,words}, access; AccessOptions] RETURNS [stream: DiskHa.ndle] = BEGIN OPEN SegmentDefs: fa: FA ~ FA[eofDA,O,O]: IF access = OefaultAccess THEN access ~ Read: SetFileAccess[file,access]; stream ~ SystemDefs.AllocateHeapNode[SIZE[Oisk StreamObject]]: stream~ ~ Model; stream.file ~ file; stream. read ~ Inl ineDefs .BITAND[access, Read]#O; stream.write ~ InlineDefs.BTTAND[access.Write]#O; stream. append .. Inl ineOefs.BTDNO[access,Append]#O; stream. buffer ~ SystemOefs.AllocatePages[Windo~Size]; IF un its=words TIIEN BrGIN OprN stream; get ~ ReadWord; unit ~ 2; put ~ savedPut ~ WriteWord; rNO; IF -stream.read TII[N stream. get ... ReadFrror; SELrCT InllneDefs.BTTAND[access.Write+Append] FROM o => stream.put ... str'eam.savedPut ... WriteEI'ror; Write => stream.savedPut ... WriteError; Append =) stream.put ~ WI'itefrror; fNOCASE: streams.mesa 24-0CT-77 18:44:36 Page 2 LockFile[file]; OpenFile[file]; stream.das[last] ~ stream.das[next] ~ fillinDAj stream.das[current] ~ file.fp.leaderDA: IF access = Append THEN [] ~ File |
Date | User | Rating | Comment |